package org.awei.config;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

import javax.servlet.http.HttpServletRequest;

@ControllerAdvice
public class GlobalExceptionHandler {
    @ExceptionHandler(Exception.class)
    public void exceptionHandler(HttpServletRequest req,Exception e) throws Exception{
        String path = req.getRequestURL().toString();
        System.out.println(path);
        e.printStackTrace();
    }
}
